package com.alibaba.datax.plugin.writer.miniowriter;

import com.alibaba.datax.common.spi.ErrorCode;

public enum MinioWriterErrorCode implements ErrorCode {
    
    REQUIRED_VALUE("MinioWriter-00", "您缺失了必须填写的参数值."),
    FILE_EXIST("MinioWriter-01", "文件已存在."),
    MIXED_INDEX_VALUE("MinioWriter-02", "数据文件已成功采集，但上传到minio失败"),
    FILE_CREATE_ERROR("MinioWriter-03", "文件夹缺失，且创建失败"),
    TYPE_ERROR("MinioWriter-04","不支持的写入文件后缀"),
    IO_ERROR("MinioWriter-05","出现IO异常"),
    CSV_WRITE_TITLE_ERROR("MinioWriter-06","csv写入表头失败"),
    ;
    
    
    private final String code;
    private final String description;

    private MinioWriterErrorCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDescription() {
        return this.description;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Description:[%s].", this.code,
                this.description);
    }

}
